#include <iostream>
using namespace std;

int nums[1000010];

void merge(int nums[], int left, int mid, int right) {
    int n1 = mid - left + 1;
    int n2 = right- mid;

    int L[n1], R[n2];
    for (int i = 0; i < n1; i++) L[i] = nums[left + i];
    for (int i = 0; i < n2; i++) R[i] = nums[mid + 1 + i];
    
    int i = 0, j = 0, k = left;
    while (i < n1 && j < n2) {
        if (L[i] < R[j]) {
            nums[k] = L[i];
            i++;
        } else {
            nums[k] = R[j];
            j++;
        }
        k++;
    }

    while (i < n1) {
        nums[k] = L[i];
        i++;
        k++;
    }
    while (j < n2) {
        nums[k] = R[j];
        j++;
        k++;
    }
}

void merge_sort(int nums[], int left, int right) {
    if (left >= right) return;

    int mid = left + (right -left) / 2;
    merge_sort(nums, left, mid);
    merge_sort(nums, mid + 1, right);
    merge(nums, left, mid, right);
}

int main() {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) cin >> nums[i];
    merge_sort(nums, 0, n - 1);
    for (int i = 0; i < n; i++) cout << nums[i] << " ";
    cout << endl;
    return 0;
}